<template>
  <div>
    <el-descriptions border :column="3">
      <el-descriptions-item label="检查单号" align="center">
        {{ modelValue.code || "" }}
      </el-descriptions-item>
      <el-descriptions-item label="受检人姓名" align="center">
        {{ modelValue.relationName || modelValue.customerName || "" }}
      </el-descriptions-item>
      <el-descriptions-item label="性别" align="center">
        {{ modelValue.sex == 1 ? "男" : modelValue.sex == 2 ? "女" : "" }}
      </el-descriptions-item>
      <el-descriptions-item label="年龄" align="center">
        {{ modelValue.age || "" }}
      </el-descriptions-item>
      <el-descriptions-item label="联系方式" align="center">
        {{ modelValue.customerPhone || "" }}
      </el-descriptions-item>
      <el-descriptions-item label="测量时间" align="center">
        <el-text truncated>
          {{ modelValue.createdAt }}
        </el-text>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script setup>
import { ref, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { useUserStore } from "@/pinia";
import { storeToRefs } from "pinia";

onMounted(() => {});

const props = defineProps({
  modelValue: {
    type: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
});
</script>

<style scoped lang="scss">
:deep(.el-descriptions__cell.el-descriptions__content) {
  width: 20% !important;
  font-size: 0.7rem !important;
}
:deep(.el-descriptions__label) {
  width: 10%;
  min-width: 6rem !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;

  @apply px-1;
}
</style>